package com.aierkeji.call.b2c.config;

import javax.persistence.EntityManagerFactory;

import org.hibernate.SessionFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.orm.hibernate5.HibernateTemplate;

@Configuration
public class DruidConfig {
	
	
	@Bean
	public HibernateTemplate initHibernateTemplate(EntityManagerFactory entityManagerFactory) {
		return new HibernateTemplate(entityManagerFactory.unwrap(SessionFactory.class));
	}
}
